package top.kaoshanji.p2ch16b;

import top.kaoshanji.p2ch16a.IWomen;

/**
 * 代码清单-p2ch16b-184页b：儿子类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/23 19:18
 */
public class Son extends Handler {

    // 儿子只处理母亲的请求
    public Son() {
        super(Handler.SON_LEVEL_REQUEST);
    }

    // 儿子的答复
    @Override
    protected void response(IWomen women) {
        System.out.println("--------母亲向儿子请示---------");
        System.out.println(women.getRequest());
        System.out.println("儿子的答复：同意");
    }

}
